package javaFeatures;

public class Student {
    private String name;
    private int sid;
    private String classname;
    private String gender;
    private int age;
    private String personality;

    public Student(String name, int sid, String classname, String gender, int age, String personality) {
        this.name = name;
        this.sid = sid;
        this.classname = classname;
        this.gender = gender;
        this.age = age;
        this.personality = personality;
    }

    public String getName() {
        return name;
    }

    public int getSid() {
        return sid;
    }

    public String getClassname() {
        return classname;
    }

    public String getGender() {
        return gender;
    }

    public int getAge() {
        return age;
    }

    public String getPersonality() {
        return personality;
    }

    public void show() {
        System.out.println("我的姓名是" + name + "，学号是" + sid + "，班级是" + classname + ",性别是" + gender + "，年龄是" + age + "岁" + "，性格是" + personality);
    }

    public static void main(String[] agrs) {
        Student stu1 = new Student("小红", 1001, "gis01班", "female", 19, "positive");
        Student stu2 = new Student("李四", 1002, "gis01班", "male", 18, "negtive");
        Student stu3 = new Student("王五", 1036, "gis01班", "male", 20, "Introverted");
        stu1.show();
        stu2.show();
        stu3.show();
        String stu1Name = stu1.getName();
    }
}